package PTAyichang;

import java.util.Scanner;

public class Pta01 {
    public static void main(String[] args) {
        int[] a = new int[5];
        Scanner sc = new Scanner(System.in);
        while (true) {
            String str = sc.next();
            if (str.equals("other"))
                break;
            if (str.equals("arr")){
                try {
                    int index = sc.nextInt();
                    int t = a[index];
                } catch (Exception e) {
                    System.out.println(e);
                }
            }
            if(str.equals("null"))
            {
                try {
                    String t = null;
                    int length = t.length();
                }catch(Exception e) {
                    System.out.println(e);
                }
            }
            if (str.equals("cast"))
                try {
                    Object ss = new String("string");
                    System.out.println((Integer) ss);
                } catch (Exception e) {
                    System.out.println(e);
                }
            if (str.equals("num")) {
                try {
                    String c = sc.next();
                    Integer num = Integer.parseInt(c);
                } catch (Exception e) {
                    System.out.println(e);
                }
            }
        }
    }
}





